// 引入Vue组件
import {
	createRouter,
	createWebHistory
} from 'vue-router'
import mainMenuVue from './pages/mainMenu.vue';
import menusVue from './pages/menus.vue';
import loginVue from './pages/login.vue';
import roleVue from './pages/role.vue';





// 定义路由
const routes = [{
		path: '/',
		component: loginVue
	}, {
		path: '/mainmenuvue',
		component: mainMenuVue,
		children: [{
			path: '/menusvue',
			component: menusVue
		}, {
			path: '/rolevue',
			component: roleVue
		}]

	}

];

// 创建router实例
const router = createRouter({
	history: createWebHistory(),
	routes,
});

export default router;